package net.sxnic.workflow.handler;

import net.sxnic.workflow.context.WfContextImpl;

public abstract class AbstractHandler<T> implements HandlerExt<T> {

	protected WfContextImpl<T> context;

	public void execute(String faction) throws WfHandlerException {
		if ("edit".equals(faction)) {
			editExecute();
		} else if ("save".equals(faction)) {
			saveExecute();
		} else if ("view".equals(faction)) {
			viewExecute();
		}
	}

	public AbstractHandler(WfContextImpl<T> context) {
		super();
		this.context = context;
	}

}
